<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<form id="dept-form" name="ui-adminlte-form"
	data-toggle="validator" role="form" method="post"
	container = "#org-tree"
	action="${pageContext.request.contextPath}/user/dept!save.action"
	forward-action="${pageContext.request.contextPath}/user/dept!treeList.action?callback=ztreeClick">
	<s:token></s:token>
	<input name="entity.parentId" type="hidden" value="${entity.parentId }">
	<input name="entity.depId" type="hidden" value="${entity.depId }">
	<input name="id" type="hidden" value="${entity.depId }" >
	<div class="form-group">
		<label>部门名称</label>
			<input type="text" name="entity.depName" value="${entity.depName}"
				class="form-control required"
				remote="${pageContext.request.contextPath}/user/dept!checkName.action?entity.parentId=${entity.parentId }&id=${entity.depId }"
				placeholder="输入部门名称"/>
	</div>
	<div class="form-group">
		<label>部门全称 </label>
			<input type="text" name="entity.fullName" value="${entity.fullName}"
			class="form-control required"
			remote="${pageContext.request.contextPath}/user/dept!checkFullName.action?id=${entity.depId }"
			placeholder="输入部门全称 "/>
	</div>
	<%@include file="/pages/exproperty/expropertyInput1Column.jsp"%>
</form>

<script>
	$(function() {
		form.init();

		var fullName = '${parentFullName}/';
		$('input[name="entity.depName"]').bind("keyup", function() {
			$('input[name="entity.fullName"]').val(fullName + $(this).val());
		});
	});
</script>
